package com.maimao.info.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.info.client.factory.GoodsFallBackFactory;
import com.maimao.model.info.Collect;
import com.maimao.model.info.vo.FollowGoods;
import com.maimao.model.user.Foot;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/22 7:54 下午
 */
@RequestMapping("/goods/goods")
@FeignClient(contextId = "goodsClient", value = ServiceContainer.GOODS_SERVICE, fallbackFactory = GoodsFallBackFactory.class, configuration = FeignInterceptor.class)
public interface GoodsClient {

    /**
     * 关注的商品
     */
    @PostMapping("/follow-goods")
    public Result<List<FollowGoods>> followGoods(@RequestBody List<Collect> goodsIdList);
}
